Runtime Environment
Q1.
Which of the following class of statement usually produces no executable code when compiled?Q2.
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements: i. Static scope facilitates w1 bindings. ii. Dynamic scope requires w2 bindings. iii. Early bindings w3 execution efficiency. iv. Late bindings w4 execution efficiency. The right choices of wl, w2, w3 and w4 (in that order) areQ3.
Which of the following is NOT represented in a subroutine's activation record frame for a stack-based programming language?Q5.
Which of the following are true? I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions III. Recursion in programming languages cannot be implemented with dynamic storage allocation IV. Nesting procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation recordsQ6.
Consider the following statements. S1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree. S2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.Which one of the following options is correct?Q7.
Relative to the program translated by a compiler, the same program when interpreted runsQ8.
For a statement S in a program, in the context of liveness analysis, the following sets are defined: USE(S) : the set of variables used in S IN(S) : the set of variables that are live at the entry of S OUT(S) : the set of variables that are live at the exit of S Consider a basic block that consists of two statements, S1 followed by S2. Which one of the following statements is correct?Q9.
Which of the following comparisons between static and dynamic type checking incorrect?Q10.
Consider the control flow graph shown. Which one of the following choices correctly lists the set of live variables at the exit point of each basic block?